package website.sgg;

/**
 * @Author: 582895699@qq.com
 * @Desctription:
 * @Date: Created in 2023/1/8 20:17
 */
public class DependencyInversion {

    interface IReceiver {
        void sendMsg(String address, Object msg);
    }

    static class SmsReceiver implements IReceiver {

        @Override
        public void sendMsg(String address, Object msg) {

        }
    }

    static class Person {
        public void send(IReceiver receiver) {
            receiver.sendMsg("", "");
        }
    }

    public static void main(String[] args) {
        Person person = new Person();
        person.send(new SmsReceiver());
    }
}
